home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group96a.txt
/
000146_icon-group-sender _Fri Jun 28 15:06:42 1996.msg
< prev
next >
Wrap
Internet Message Format
|
1996-09-05
|
1KB
Received: by cheltenham.cs.arizona.edu; Fri, 28 Jun 1996 16:27:27 MST
Date: Fri, 28 Jun 1996 15:06:42 -0500
From: jeffery@dragon.cs.utsa.edu (Clinton Jeffery)
Message-Id: <199606282006.PAA10115@coyote25.cs.utsa.edu>
To: H.Lawson@tees.ac.uk
Cc: icon-group@cs.arizona.edu
In-Reply-To: <31D3FA40.1435@tees.ac.uk> (message from Hamish Lawson on Fri, 28 Jun 1996 16:29:04 +0100)
Subject: Re: Ordered tables
Content-Length: 0
Errors-To: icon-group-errors@cs.arizona.edu
Status: O
[Hamish Lawson writes:]
I'd like to be able to obtain the keys of a table in the order of their
creation (key() produces them in random order). Is there a way to do this?
No, there is no timestamp or ordering information for elements within tables.
Failing that, what is the best way to go about implementing a data
structure in Icon that is both indexed and ordered?
The easiest way is to maintain a list and table in tandem; when you insert
into the table, put into the list at the same time. The Idol technical
report has an example class (tabular queue, or taque) that does this, but
you can do it by hand in Icon just fine.
Clint Jeffery
jeffery@ringer.cs.utsa.edu
Division of Computer Science
The University of Texas at San Antonio
Research http://www.cs.utsa.edu/research/plss.html